<template>

    <div >
        <!--  <el-button @click="print">点击打印</el-button>
      <section ref="print">
            dddddddddddddddddd打印
        </section>
        <div class="no-print">
            aaaaaaaaaaaaaaaaaa不打印
        </div>-->
    </div>


</template>

<script>
    export default{
            name: 'impor',
            data: function(){
                return{
            }},
        methods:{
           /* print(){
                this.$print(this.$refs.print)
            }*/
           test(){
               const target = [{
                   id:1,
                   age:19,
                   sex:{
                       id:1,
                       sexName:'nan'
                   },
                   contact:[
                       {id:1,name:'a',tel:'123'},
                       {id:1,name:'a',tel:'123'}
                   ]

               },{id:2,
               age:18
               }]

               const returnedTarget = Object.assign(target[0], target[1]);
               console.log(target);
               console.log(returnedTarget);
           },
        },
        created() {
                this.test()
        }

    }


</script>

<style scoped>
ul{
    width: 100%;
    height: 50px;
    background-color: lightgray;
}
    li{
        width: 100%;
        margin-top: 10px;
        background-color: mediumpurple;
    }
</style>
